/*
 * @Author: Clark
 * @Email: haixuanwoTxh@gmail.com
 * @Date: 2022-10-16 17:17:55
 * @LastEditors: Clark
 * @LastEditTime: 2022-11-15 10:51:10
 * @Description: file content
 */
#ifndef DAYTIME_H
#define DAYTIME_H

#include "muduo/net/TcpServer.h"

using namespace muduo;
using namespace muduo::net;

// RFC 867
class DaytimeServer
{
 public:
  DaytimeServer(EventLoop* loop, const InetAddress& listenAddr);
  void start();

 private:
  void onConnection(const TcpConnectionPtr& conn);
  void onMessage(const TcpConnectionPtr& conn, Buffer* buf, Timestamp time);

  TcpServer tcpServer;
};

#endif
